package first.endtoend

/**
 * Created with IntelliJ IDEA.
 * User: Olfa
 */
class Aid
{

    Date startDate;
    Date endDate;
    static belongsTo = [category: Category]
    Boolean valid //to see if aid has not expired

    Date dateCreated
    Date lastUpdated

    static constraints = {
        category(nullable: false)
        startDate(nullable: false)
        endDate(nullable: false)
        valid(nullable: true)

        dateCreated nullable: true
        lastUpdated nullable: true
    }

    @Override
    public String toString()
    {
        return id + " : " + startDate + " / " + endDate
    }

}
